<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions" 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">
  
  <process id="nestedSimpleSubProcess" isExecutable="true">
  
    <startEvent id="theStart" />
    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="outerSubProcess" />
    
    
    <subProcess id="outerSubProcess">
    
      <startEvent id="outerSubProcessStart" />
      <sequenceFlow id="flow2" sourceRef="outerSubProcessStart" targetRef="innerSubProcess" />
      
      
      <subProcess id="innerSubProcess">
      
        <startEvent id="innerSubProcessStart" />
        <sequenceFlow id="flow3" sourceRef="innerSubProcessStart" targetRef="innerSubProcessTask" />
        
        <userTask id="innerSubProcessTask" name="Task in subprocess" />
        <sequenceFlow id="flow4" sourceRef="innerSubProcessTask" targetRef="innerSubProcessEnd" />
        
        <endEvent id="innerSubProcessEnd" />
      
      </subProcess>
      
    
    </subProcess>
    <sequenceFlow id="flow6" sourceRef="outerSubProcess" targetRef="afterSubProcessTask" />


    <userTask id="afterSubProcessTask" name="Task after subprocesses" />
    <sequenceFlow id="flow7" sourceRef="afterSubProcessTask" targetRef="theEnd" />
    
    <endEvent id="theEnd" />
    
  </process>

</definitions>
